package data;

public enum Carrier {
	ALLTEL("Alltel", "@message.alltel.com"),
	ATT("AT&T", "@txt.att.net"),
	BOOST_MOBILE("Boost Mobile", "@myboostmobile.com"),
	CRICKET_WIRELESS("Cricket Wireless", "@sms.mycricket.com"),
	NEXTEL("Nextel", "@message.nextel.com"),
	SPRINT("Sprint", "@messaging.sprintpcs.com"),
	TMOBILE("TMobile", "@tmomail.net"),
	VERIZON("Verizon", "@vzwpix.com"),
	VIRGIN_MOBILE_USA("Virgin Mobile USA", "@vmobl.com"),
	CENTENNIAL_WIRELESS("Centennial Wireless", "@cwemail.com"),
	CELLULAR_SOUTH("Cellular South", "@csouth1.com"),
	CINCINNATI_BELL("Cincinnati Bell", "@gocbw.com"),
	QWEST("Qwest", "@qwestmp.com"),
	BELL_CANADA("Bell Canada", "@txt.bellmobility.ca"),
	TELUS("Telus", "@msg.telus.com"),
	ROGER("Rogers", "@pcs.rogers.com");

	private String carrierName;
	private String mailDomain;

	private Carrier(String carrierName, String mailDomain) {
		this.carrierName = carrierName;
		this.mailDomain = mailDomain;
	}

	public String getCarrierName() {
		return carrierName;
	}

	public String getMailDomain() {
		return mailDomain;
	}

	public static Carrier getCarrier(String name) {
		for (Carrier carrier : values()) {
			if (carrier.getCarrierName().equalsIgnoreCase(name)) {
				return carrier;
			}
		}

		return null;
	}
}
